MsgBox "There is not enough disk space on drive " + destDrive$ + ": An estimated" + Str$(totalNeeded - destSpaceFree) + " additional bytes are needed.", 16, dialogCaption$
GoTo errorsetup
End If
Else
If winSpaceFree < winSysNeeded Then
MsgBox "There is not enough disk space on drive " + winDrive$ + ": An estimated" + Str$(winSysNeeded - winSpaceFree) + " additional bytes are needed.", 16, dialogCaption$
GoTo errorsetup
End If
If destSpaceFree < otherneeded Then
MsgBox "There is not enough disk space on drive " + destDrive$ + ": An estimated" + Str$(otherneeded - destSpaceFree) + " additional bytes are needed.", 16, dialogCaption$
GoTo errorsetup
End If
End If
If Not CreatePath(destPath$) Then GoTo errorsetup
ShowStatusDialog dialogCaption$, totalNeeded
hinum = 0
noitems = 0
ReDIm item$(1 to hinum, 1 to noitems)
ReDim noitem(1 to hinum)
For xxx = 1 To hinum
For yyy = 1 To noitem(xxx)
itemm$ = RTrim$(item$(xxx, yyy))
lngth = Len(itemm$)
itemm$ = Right$(itemm$, lngth - 3)
If UCase$(Right$(itemm$, 3)) = "VBX" Or UCase$(Right$(itemm$, 3)) = "DLL" Then
dest$ = winsysdir$
Else
dest$ = destpath$
End If
If UCase$(rtrim$(ltrim$(itemm$))) = "SETUPKIT.DLL" Then
dest$ = destpath$
End If
If Not CopyFile(sourcepath$, dest$, itemm$, 0) Then GoTo errorsetup